package com.hopu.erp.service.impl;

import com.hopu.erp.dao.FunctionsDAO;
import com.hopu.erp.entity.Functions;
import com.hopu.erp.service.FunctionsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FunctionsServiceImpl implements FunctionsService {

    @Autowired
    private FunctionsDAO functionsDAO;

    @Override
    public List<Functions> findFunctionsByUsername(String username) {
        return functionsDAO.selectFunctionsByUsername(username);
    }

    @Override
    public List<Functions> findAllFunctions() {
        return functionsDAO.selectAllFunctions();
    }

    @Override
    public List<Functions> findFunctionsByRoleId(int roleId) {
        return functionsDAO.selectFunctionsByRoleId(roleId);
    }
}
